package com.southwind.mapper;

import com.southwind.entity.BusRent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.southwind.vo.StatVO;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-05-28
 */
public interface BusRentMapper extends BaseMapper<BusRent> {
    @Select({"select sum(price) value ,opername name from bus_rent group by opername"})
    public List<StatVO> opernameYearGradeStat();

    @Update({"update bus_rent set rentflag = 1 where rentid = #{rentid} "})
    public void updateRentFlag(String rentid);
}
